home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
USGS: Oil & Gas Fields of Asia Pacific
/
USGS Maps Showing Geology, Oil & Gas Fields of Asia Pacific.iso
/
pc
/
ASPAC
/
VIEWPC03
/
SCRIPTS
/
ZOMINTOL.AVE
< prev
Wrap
Text File
|
1999-03-10
|
3KB
|
107 lines
' zomintol.ave
' Integrates Arcview View.Zoomin.Tool system script to
' Label Geology on the fly
' D.W. Steinshouer - GeoLukas for U.S.G.S.
' World Energy Project
' Thomas Ahlbrandt Project Chief
region3 = av.GetProject
region3.SetModified(true)
theView = av.GetActiveDoc
r = theView.ReturnUserRect
d = theView.GetDisplay
if (r.IsNull) then
d.ZoomIn(125)
d.PanTo(d.ReturnUserPoint)
else
d.ZoomToRect(r)
end
leg = region3.FindDoc("Geologic Legend")
if (theView <> leg) then
' geolabel.ave
' labels geology at scale > 1:10000000
' Douglas Steinshouer 11/14/98
' GeoLukas for USGS
' World Energy Project
' Defines the theme and clears existing labels
av.ShowMsg("Labeling geologic age ...")
av.ShowStopButton
av.SetStatus(0)
theView = av.GetActiveDoc
theTheme = theView.GetThemes.Get(5)
theTheme.SetActive(true)
theTheme.GetGraphics.SelectLabels
theTheme.GetGraphics.Invalidate
theView.GetGraphics.ClearSelected
' Determines scale of zoomed view
size = theView.GetDisplay.ReturnVisExtent
tall = size.GetHeight
long = size.GetWidth
' Filters scale and draws labels
if ((tall < 889000) AND (long < 1227670)) then
agelabel = Labeler.Make(size)
agelabel.SetFeatureWeight(#LABEL_WEIGHT_NO)
agelabel.SetLabelWeight(#LABEL_WEIGHT_HIGH)
agesymbol = TextSymbol.Make
agesymbol.SetFont(Font.Make("Univers","Normal"))
if ((tall < 44450) AND (long < 61383)) then
agesymbol.SetSize(15)
elseif ((tall < 88900) AND (long < 122767)) then
agesymbol.SetSize(12)
elseif ((tall < 222250) AND (long < 306917)) then
agesymbol.SetSize(11)
elseif ((tall < 444500) AND (long < 613835)) then
agesymbol.SetSize(10)
elseif ((tall < 666751) AND (long < 920752)) then
agesymbol.SetSize(9)
else
agesymbol.SetSize(8)
end
theTheme.SetLabelTextSym(agesymbol)
agelabel.Load(theTheme)
theView.GetAutoLabels(agelabel,true)
else
theTheme.GetGraphics.SelectLabels
theTheme.GetGraphics.Invalidate
theView.GetGraphics.ClearSelected
end
end
t2 = theView.GetThemes.Get(0)
t2.SetActive(true)
t2.GetGraphics.SelectLabels
t2.GetGraphics.Invalidate
theView.GetGraphics.ClearSelected
citylabel = Labeler.Make(size)
citylabel.SetFeatureWeight(#LABEL_WEIGHT_NO)
citylabel.SetLabelWeight(#LABEL_WEIGHT_HIGH)
citysymbol = TextSymbol.Make
citysymbol.SetFont(Font.Make("Univers","Italic"))
citysymbol.SetSize(10)
t2.SetLabelTextSym(citysymbol)
citylabel.Load(t2)
theView.GetAutoLabels(citylabel,true)
ts = theView.GetThemes
for each t in ts
t.SetActive(false)
end
av.SetStatus(100)
av.ClearMsg